package com.chenl.interview.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chenl.interview.common.DeleteRequest;
import com.chenl.interview.model.dto.questionBank.QuestionBankAddRequest;
import com.chenl.interview.model.dto.questionBank.QuestionBankQueryRequest;
import com.chenl.interview.model.entity.QuestionBank;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chenl.interview.model.vo.QuestionBankVO;

/**
* @author chenl
* @description 针对表【question_bank(题库)】的数据库操作Service
* @createDate 2024-12-29 15:33:22
*/
public interface QuestionBankService extends IService<QuestionBank> {

    /**
     * 校验数据
     *
     * @param questionBank
     * @param add 对创建的数据进行校验
     */
    void validQuestionBank(QuestionBank questionBank, boolean add);

    /**
     * 新增题库
     * @param questionBankAddRequest
     * @return
     */
    Long addQuestionBank(QuestionBankAddRequest questionBankAddRequest);

    /**
     * 获取题库封装类
     * @param questionBankQueryRequest
     * @return
     */
    QuestionBankVO getQuestionBankVO(QuestionBankQueryRequest questionBankQueryRequest);

    /**
     * 删除题库
     * @param deleteRequest
     * @return
     */
    Boolean deleteQuestionBank(DeleteRequest deleteRequest);

    /**
     * 获取查询条件
     * @param questionBankQueryRequest
     * @return
     */
    QueryWrapper<QuestionBank> getQueryWrapper(QuestionBankQueryRequest questionBankQueryRequest);

    Page<QuestionBankVO> getQuestionBankVOPage(Page<QuestionBank> questionBankPage);
}
